<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <style>
      div {
        width: 100px;
        height: 100px;
        background: #000;
      }
      body {
        height: 100vh;
        width: 100vw;
        display: grid;
        justify-content: center;
        align-items: center;
      }
      main {
        transform-style: preserve-3d;
        transform: perspective(900px) rotateY(45deg);
      }
      body main div {
        transform: rotateY(60deg) rotateX(50deg);
      }
      div:nth-child(1) {
        transform: rotateY(60deg) rotateX(50deg) translateZ(-300px);
      }
    </style>
    <main>
      <div></div>
      <div></div>
      <div></div>
    </main>
  </body>
</html>
